Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(s2n-quic-events): Adds events for s2n-quic-dc #2321

Merged
merged 8 commits into from
Sep 23, 2024
Merged

Conversation

maddeleine
Copy link
Contributor

Resolved issues:

N/A

Description of changes:

This PR includes changes to generate events for both s2n-quic and s2n-quic-dc. The biggest difference is that s2n-quic-dc will be passing around a single, shared Subscriber, which means that we need to produce events that take an immutable reference to the Subscriber, rather than a mutable reference. This has some cascading effects that you can see in this PR.

Call-outs:

I basically tokenized everything, not sure if this is how we want this to look. My goal was to make sure the original generated.rs didn't change at all with this change.

Testing:

Compiles. I included an example event in the dc folder to show what is produced from the change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@camshaft camshaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - just a few small changes

dc/s2n-quic-dc/src/event/generated.rs Outdated Show resolved Hide resolved
dc/s2n-quic-dc/src/event/generated.rs Outdated Show resolved Hide resolved
dc/s2n-quic-dc/src/event/generated.rs Outdated Show resolved Hide resolved
dc/s2n-quic-dc/src/event/generated.rs Outdated Show resolved Hide resolved
Comment on lines +174 to +175
#[doc = r" &mut self,"]
#[doc = r" context: &mut Self::ConnectionContext,"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm looks like we'll need to modify this example as well. But we can have that as a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh yeah, wasn't sure what we wanted to do with the docs. That will be a follow up.

#[doc = r""]
#[doc = r" ```no_run"]
#[doc = r" # mod s2n_quic { pub mod provider { pub mod event {"]
#[doc = r" # pub use s2n_quic_core::event::{api as events, api::ConnectionInfo, api::ConnectionMeta, Subscriber};"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. We need to reference the correct crate.

@maddeleine maddeleine merged commit e0ffbda into main Sep 23, 2024
128 of 130 checks passed
@maddeleine maddeleine deleted the dc_quic_events branch September 23, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants